/**
 * Created by suweiming on 2017/12/30.
 */
import React from 'react';
import {StyleSheet, PixelRatio, Button, Text, View, TextInput, Image, TouchableHighlight} from 'react-native';
import {Form} from '../../css/form';
import {get, post, domain, Icon} from '../../lib/http';
import {Container, Content, Footer, FooterTab} from "native-base";

export default class Home extends React.Component {

    render() {
        return (
            <Container style={CSS.container}>
                <View style={CSS.menu}>
                    <Icon
                        onPress={() =>
                        {
                            this.props.navigation.navigate('DrawerToggle')
                        }
                        }
                        name={'ios-menu'}
                        size={30} color={'#FFF'}/>
                </View>
                <Content>
                    <View style={CSS.sum}>
                    </View>
                    <View style={CSS.nav}>
                        <View style={CSS.gridColumn}>
                            <View style={CSS.gridItemNoLeftRight}>
                                <Icon name="ios-contacts-outline" size={45}/>
                                <Text>客户</Text></View>
                            <View style={CSS.gridItem}>
                                <Icon name="ios-compass-outline" size={45}/>
                                <Text>增加</Text></View>
                            <View style={CSS.gridItemNoLeftRight}>
                                <Icon name="ios-compass-outline" size={45}/>
                                <Text>最近一周</Text></View>
                        </View>
                        {/*<View style={CSS.gridColumn}>*/}
                            {/*<View style={CSS.gridItemNoBorder}>*/}
                                {/*<Icon name="ios-compass-outline" size={45}/>*/}
                                {/*<Text>购货订单</Text></View>*/}
                            {/*<TouchableHighlight style={CSS.gridItemNoTopBottom}>*/}
                                {/*<View>*/}
                                    {/*<Icon name="ios-compass-outline" size={45}/>*/}
                                    {/*<Text>购货单</Text></View>*/}
                            {/*</TouchableHighlight>*/}
                            {/*<View style={CSS.gridItemNoBorder}>*/}

                                {/*<Icon name="ios-compass-outline" size={45}/>*/}
                                {/*<Text>购货退货单</Text></View>*/}
                        {/*</View>*/}
                        {/*<View style={CSS.gridColumn}>*/}
                            {/*<View style={CSS.gridItemNoLeftRight}>*/}
                                {/*<Icon name="ios-compass-outline" size={45}/>*/}
                                {/*<Text>商品</Text></View>*/}
                            {/*<View style={CSS.gridItem}>*/}
                                {/*<Icon name="ios-compass-outline" size={45}/>*/}
                                {/*<Text>客户</Text></View>*/}
                            {/*<View style={CSS.gridItemNoLeftRight}>*/}
                                {/*<Icon name="ios-compass-outline" size={45}/>*/}
                                {/*<Text>供应商</Text></View>*/}
                        {/*</View>*/}
                    </View>
                </Content>
            </Container>
        );
    }
}
const CSS = StyleSheet.create({
    menu: {backgroundColor: '#41a2fc', height: 40, paddingTop: 5, paddingLeft: 10},
    nav: {flex: 1, backgroundColor: '#FFF'},
    sum: {
        height: 240,
        backgroundColor: '#41a2fc'
    },
    container: {
        borderWidth: 0,
        marginTop: 50,
        flex: 1,
        padding: 0,
    },
    gridColumn: {height: 100, flexDirection: 'row'},
    gridItem: {
        height: 100,
        flex: 1,
        borderWidth: 1 / PixelRatio.get(),
        borderColor: '#ddd',
        alignItems: 'center',
        paddingTop: 15,
    },
    gridItemNoLeftRight: {
        height: 100,
        flex: 1,
        borderWidth: 1 / PixelRatio.get(),
        borderLeftWidth: 0,
        borderRightWidth: 0,
        borderColor: '#ddd',
        alignItems: 'center',
        paddingTop: 15,
    },
    gridItemNoTopBottom: {
        height: 100,
        flex: 1,
        borderWidth: 1 / PixelRatio.get(),
        borderTopWidth: 0,
        borderBottomWidth: 0,
        borderColor: '#ddd',
        alignItems: 'center',
        paddingTop: 15,
    },
    gridItemNoBorder: {height: 100, flex: 1, borderWidth: 0, alignItems: 'center', paddingTop: 15,}
});


